<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width:80rem">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">{{vm.modalTitle}}</h4>
            </div>
            <div class="modal-body">
                <div style="height: 40rem">
                    <div id="metric_chart" style="height: 40rem;width: 70rem;"></div>
                </div>
            </div>
            <div class="modal-footer">
            </div>
        </div>
    </div>
</div>
<!--导航栏-->
<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                        rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/star">首页</a>
                </li>
                <li class="active">流量分析</li>
            </ul>
        </div>
    </div>
</div>

<div style="padding: 0 10px 0; float:right;">
    <div style="text-align: right;font-size: 1.2rem; color: red;">数据更新时间：每日10:00后更新昨日数据，表doris：ads_zp_n_kanban_flow_summary_flow</div>
    <br />
</div>

<!--查询条件-->
<!--<div class="container-fluid" style="margin: 0 10px 0 10px;">-->

<!--</div>-->

<div class="container-fluid">
    <div style="margin: 10px">
        <div class="row">
            <div class="col-sm-4 col-md-4">
                <div class="btn-group" data-toggle="buttons">
                    <label class="btn btn-default" ng-class="{'active':vm.p.topicId==='31'}" ng-click="toggleInteval('31')">
                        <input type="radio" value="31" ng-model="vm.p.topicId" ng-checked="true"> 来源
                    </label>
                    <label class="btn btn-default" ng-class="{'active':vm.p.topicId==='7'}" ng-click="toggleInteval('7')">
                        <input type="radio" value="7" ng-model="vm.p.topicId"> 场景
                    </label>
                    <label class="btn btn-default" ng-class="{'active':vm.p.topicId==='0'}" ng-click="toggleInteval('0')">
                        <input type="radio" value="0" ng-model="vm.p.topicId"> 网格
                    </label>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-12 col-md-12">
                <div style="margin: 10px 0 0;">

                    <form class="form-inline">
                        <div class="form-group" style="margin-bottom: 1.2rem;margin-right: 3rem;">
                            <label for="dt" style="display: table-cell;">业务时间：</label>
                            <div class='input-group date' id='dt' style="float: left;">
                                <input type='text' class="form-control" ng-model="vm.p.dt" name="dt"
                                       style="width: 14rem" />
                                <span class="input-group-addon" style="width: 4rem">
                                        <span class="glyphicon glyphicon-calendar"></span>
                                    </span>
                            </div>
                            <div class='input-group date' id='dt2' style="float: left;">
                                <label for="dt2" style="display: table-cell;">-</label>
                                <input type='text' class="form-control" ng-model="vm.p.dt2" name="dt2"
                                       style="width: 14rem" />
                                <span class="input-group-addon" style="width: 4rem">
                                        <span class="glyphicon glyphicon-calendar"></span>
                                    </span>
                            </div>
                        </div>
                        <div class="form-group" style="margin-bottom: 1.2rem;margin-right: 3rem;">
                            <label for="biz" style="">业务线：</label>
                            <select class="form-control" id="biz" ng-model="vm.p.biz" style="width:17.6rem"
                                ng-init="vm.p.biz='58'">
                                <option value="58">58</option>
                                <option value='ganji'>ganji</option>
                            </select>
                        </div>
                        <div class="form-group" style="margin-bottom: 1.2rem;margin-right: 3rem;">
                            <label for="platform" style="">平台类型：</label>
                            <select class="form-control" id="platform" ng-model="vm.p.platform" style="width:17.6rem"
                                ng-init="vm.p.platform='all'">
                                <option value="all">全部</option>
                                <option value="1">PC</option>
                                <option value='2'>M</option>
                                <option value='3'>APP</option>
                                <option value='-999999'>其他</option>
                            </select>
                        </div>
                        <div class="form-group" style="margin-bottom: 1.2rem;margin-right: 3rem;">
                            <label for="lspmType" style="">流量来源：</label>
                            <select class="form-control" id="lspmType" ng-model="vm.p.lspmType" style="width:17.6rem"
                                    ng-init="vm.p.lspmType='all'">
                                <option value="all">全部</option>
                                <option value="1">站内</option>
                                <option value='2'>Push</option>
                                <option value='3'>投放</option>
                            </select>
                        </div>
                        <div ng-show="(vm.p.topicId===vm.d.slot || vm.p.topicId===vm.d.cube)" class="form-group" style="margin-bottom: 1.2rem;margin-right: 3rem;">
                            <label for="slot" style="">场景：</label>
                            <input type='text' class="form-control" ng-model="vm.p.slot" id="slot"
                                style="width: 17.6rem" />
                        </div>
                        <div ng-show="vm.p.topicId==='0'" class="form-group" style="margin-bottom: 1.2rem;margin-right: 3rem;">
                            <label for="isAd" style="">是否商业：</label>
                            <select class="form-control" id="isAd" ng-model="vm.p.isAd" style="width:17.6rem"
                                    ng-init="vm.p.isAd='all'">
                                <option value="all">全部</option>
                                <option value="0">否</option>
                                <option value='1'>是</option>
                            </select>
                        </div>
                        <div ng-show="vm.p.topicId==='0'" class="form-group" style="margin-bottom: 1.2rem;margin-right: 3rem;">
                            <label for="requesttype" style="">商业类型：</label>
                            <input type='text' class="form-control" ng-model="vm.p.requesttype" id="requesttype"
                                   style="width: 17.6rem" />
                        </div>
                        <div ng-show="vm.p.topicId==='0'" class="form-group" style="margin-bottom: 1.2rem;margin-right: 3rem;">
                            <label for="dispLocal1" style="">地域一级：</label>
                            <input type='text' class="form-control" ng-model="vm.p.dispLocal1" id="dispLocal1"
                                style="width: 17.6rem" />
                        </div>
                        <div ng-show="vm.p.topicId==='0'" class="form-group" style="margin-bottom: 1.2rem;margin-right: 3rem;">
                            <label for="dispCate3" style="">类目三级：</label>
                            <input type='text' class="form-control" ng-model="vm.p.dispCate3" id="dispCate3"
                                style="width: 17.6rem" />
                        </div>
                        <div class="form-group" style="margin-bottom: 1.2rem;margin-right: 3rem;">
                            <button id="refreshTable" type="button" class="btn btn-primary" ng-click="queryReport()">
                                <span class="glyphicon glyphicon-search" aria-hidden="true"></span>查询
                            </button>
                        </div>
                    </form>
                </div>
            </div>

        </div>
        <div class="row">
            <div class="col-sm-12 col-md-12 main" style="float: right">
                <label style="float: right">耗时：{{vm.result.ms}}ms</label>
                <table id="list_table" class="table table-condensed" data-toolbar="#toolbar" data-search="true"
                    data-show-toggle="true" data-show-columns="true" data-show-pagination-switch="true"
                    data-pagination="true" data-search-align="left" data-buttons-align="left" data-toolbar-align="left"
                    data-loading-template="tableLoadingTemplate" data-side-pagination="client" data-show-export="true">
                    <thead>
                        <tr>
                            <th data-field="SerialNumber" data-sortable="true" data-formatter="serialFormatter">序号</th>
                            <!-- <th data-field="dt" data-sortable="true">业务时间</th> -->
                            <th data-field="topicId" data-sortable="true">维度分组</th>
                            <th data-field="biz" data-sortable="true">业务线</th>
                            <th data-field="platform" data-sortable="true" data-formatter="platformFormat">平台类型</th>

                            <th data-field="lspmType" data-sortable="true" data-formatter="lspmTypeFormat">
                                流量来源</th>
                            <th data-field="slot" data-sortable="true" data-formatter="slotFormat">
                                场景slot</th>
                            <th data-field="isAd" data-sortable="true" data-formatter="isAdFormat">
                                是否商业</th>
                            <th data-field="requesttype" data-sortable="true" data-formatter="requesttypeFormat">
                                商业类型</th>
                            <th data-field="dispLocal1Cn" data-sortable="true" data-formatter="dispLocal1NameFormat">
                                地域一级（展现）</th>
                            <th data-field="dispCate3Cn" data-sortable="true" data-formatter="dispCate3NameFormat">
                                类目三级（展现）</th>

                            <th data-field="searchCnt" data-sortable="true" data-formatter="summaryReportFormatter">
                                检索量</th>
                            <th data-field="searchUv" data-sortable="true" data-formatter="summaryReportFormatter">
                                检索uv</th>
                            <th data-field="expCnt" data-sortable="true" data-formatter="summaryReportFormatter">
                                曝光量</th>
                            <th data-field="expUv" data-sortable="true" data-formatter="summaryReportFormatter">
                                曝光uv</th>
                            <th data-field="clickCnt" data-sortable="true" data-formatter="summaryReportFormatter">
                                点击量</th>
                            <th data-field="clickUv" data-sortable="true" data-formatter="summaryReportFormatter">
                                点击uv</th>
                            <th data-field="deliveryCnt" data-sortable="true" data-formatter="summaryReportFormatter">
                                投递量</th>
                            <th data-field="deliveryUv" data-sortable="true" data-formatter="summaryReportFormatter">
                                投递uv</th>
                            <th data-field="imCnt" data-sortable="true" data-formatter="summaryReportFormatter">
                                微聊量 </th>
                            <th data-field="imUv" data-sortable="true" data-formatter="summaryReportFormatter">
                                微聊uv </th>
                            <th data-field="imReadCnt" data-sortable="true" data-formatter="summaryReportFormatter">
                                微聊阅读量</th>
                            <th data-field="imReplyCnt" data-sortable="true" data-formatter="summaryReportFormatter">
                                微聊回复量</th>
                            <th data-field="telCnt" data-sortable="true" data-formatter="summaryReportFormatter">
                                电话量</th>
                            <th data-field="telUv" data-sortable="true" data-formatter="summaryReportFormatter">
                                电话uv</th>
                            <th data-field="telConnCnt" data-sortable="true" data-formatter="summaryReportFormatter">
                                电话接通量</th>
                            <th data-field="telConnUv" data-sortable="true" data-formatter="summaryReportFormatter">
                                电话接通uv</th>
                            <th data-field="linkUv" data-sortable="true" data-formatter="summaryReportFormatter">
                                连接uv</th>
                            <th data-field="yxCost" data-sortable="true" data-formatter="summaryReportFormatter">
                                优选金额</th>
                            <th data-field="jzCost" data-sortable="true" data-formatter="summaryReportFormatter">
                                精准金额</th>
                            <th data-field="omsCost" data-sortable="true" data-formatter="summaryReportFormatter">
                                摊销金额</th>
                            <th data-field="cpa" data-sortable="true" data-formatter="summaryReportFormatter">
                                摊销单价</th>
                            <th data-field="expCnt1" data-sortable="true" data-formatter="summaryReportFormatter">
                                (串联)曝光量</th>
                            <th data-field="clickCnt1" data-sortable="true" data-formatter="summaryReportFormatter">
                                (串联)点击量</th>
                            <th data-field="deliveryCnt1" data-sortable="true" data-formatter="summaryReportFormatter">
                                (串联)投递量</th>
                            <th data-field="imCnt1" data-sortable="true" data-formatter="summaryReportFormatter">
                                (串联)微聊量 </th>
                            <th data-field="telCnt1" data-sortable="true" data-formatter="summaryReportFormatter">
                                (串联)电话量</th>
                            <th data-field="ctr3" data-sortable="true" data-formatter="ctr3Formatter">
                                CTR3</th>
                            <th data-field="cvr3" data-sortable="true" data-formatter="cvr3Formatter">
                                CVR3</th>
                            <th data-field="imr3" data-sortable="true" data-formatter="imr3Formatter">
                                IMR3</th>
                            <th data-field="telr3" data-sortable="true" data-formatter="telr3Formatter">
                                TELR3</th>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
    </div>
</div>